package org.net5ijy.commons.util.security;

import static org.net5ijy.commons.util.encrypt.MD5Util.*;

/**
 * Md5PasswordEncoder
 *
 * @author xuguofeng
 * @date 2020/7/13 12:06
 */
public class Md5PasswordEncoder implements PasswordEncoder {

  @Override
  public String encode(String password) {
    return md5(password);
  }

  @Override
  public boolean match(String password, String encryptPassword) {
    return md5(password).equals(encryptPassword);
  }
}
